﻿@using QqhrCitizen.Models;
@using QqhrCitizen.Models.ViewModel;
@{
    ViewBag.Title = "直播首页_齐齐哈尔市民学习网";
    int i = 0;
}
<script>
    $("#topmenu_live").attr("class", "item_selected");
</script>
<div id="d_menu" class="d-menu menu-bok">
    <div id="d_menu_c" class="d-menu-c">
        <!-- region start: menu -->
        <div id="d_headmenu" class="d-headmenu">
            <div class="body">
                <a class="item_selected" href="/Live/Index" id="headmenu_default">直播首页</a>
                <a class="item" href="/Live/Review" id="headmenu_review">往期回顾</a>
            </div>
        </div><!-- region end: menu -->
    </div>
</div>
<div id="d_bottom" class="d-bottom" style="visibility: hidden; position: relative;">
    <div class="d-bottom-c">
        <div id="d_scrolltop" class="d-scrolltop" style="right: -70px;">
            <span class="t" onclick="$('html,body').animate({scrollTop: '0px'}, 800);">顶部</span>
        </div>
    </div>
</div>
<div class="d-row">
    <div class="d-row-c">
        <div class="d-col-2-12">
            <div class="contentarea">
                <!-- region start: 最新直播 -->
                <div id="d_livenew" class="d-livenew">
                    <div class="head">
                        最新直播
                    </div>
                    <div class="body" id="live_body">
                        <div id="slide_bookhot" class="slidecontainer lstLive">
                            @foreach (var item in ViewBag.LiveList)
                            {
                                <div class="item">
                                    <a class="cover live_show" id="live_id_@item.ID" href="/Live/Show/@item.ID" style="cursor:pointer">
                                        <img src="/Live/ShowPicture/@item.ID" />
                                    </a>
                                    <div class="title trim">
                                        <a title="@item.Title" class="live_show" id="live_id_@item.ID" href="/Live/Show/@item.ID" style="cursor:pointer">@item.Title</a>
                                        <input type="hidden" id="live_hidden_@item.ID" value="@item.NeedAuthorize" />
                                    </div>
                                    @if (item.End < DateTime.Now)
                                    {
                                        <div class="description" title="" style="color:#c9302c">已结束</div>
                                    }
                                    else if (item.Begin > DateTime.Now)
                                    {
                                        <div class="description" title="" style="color:#eea236">未开始</div>
                                    }
                                    else
                                    {
                                        <div class="description" title="" style="color:#449d44">进行中</div>
                                    }
                                    <div class="date"><span>开始:@item.Begin</span><br />结束<span>@item.End</span></div>
                                </div>
                                i++;
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>
<script>
    $(document).ready(function(){
        var word_list=@i;
        var height=Math.ceil(word_list/4)*270;
        $("#live_body").height(height);
    });
</script>